#ifndef __BSP_ADC_H_
#define __BSP_ADC_H_

#include "adc.h"

typedef union
{
    struct __packed
    {
        uint16_t IBUS;
        uint16_t NTC3;
        uint16_t NTC1;
        float IBUS_f;
        float NTC3_f;
        float NTC1_f;
    }ADC_Channel;
    uint16_t ADC_Value[3];
}MYADC1_Typedef;

typedef union
{
    struct __packed
    {
        uint16_t ADSPE;
        uint16_t VA;
        uint16_t VB;
        uint16_t VC;
        uint16_t VBUS;
        uint16_t NTC2;
        float ADSPE_f;
        float VA_f;
        float VB_f;
        float VC_f;
        float VBUS_f;
        float NTC2_f;
    }ADC_Channel;
    uint16_t ADC_Value[6];
}MYADC2_Typedef;

typedef union
{
    struct __packed
    {
        uint16_t IC;
        uint16_t IB;
        uint16_t IA;
        float IC_f;
        float IB_f;
        float IA_f;
    }ADC_Channel;
    uint16_t ADC_Value[3];
}I_abc_Typedef;

void bsp_adc_init(MYADC1_Typedef *UserADC1, MYADC2_Typedef *UserADC2);
void bsp_adc1_read(MYADC1_Typedef *UserADC1);
void bsp_adc2_read(MYADC2_Typedef *UserADC2);

#endif /* __BSP_ADC_H_ */
